package model

import (
	"fmt"
	"gorm.io/gorm"
	"time"
)

type _WkbUserDetailMgr struct {
	*_BaseMgr
}

// WkbUserDetailMgr open func
func WkbUserDetailMgr(db *gorm.DB) *_WkbUserDetailMgr {
	if db == nil {
		panic(fmt.Errorf("WkbUserDetailMgr need init by db"))
	}
	ctx, cancel := context.WithCancel(context.Background())
	return &_WkbUserDetailMgr{_BaseMgr: &_BaseMgr{DB: db.Table("wkb_user_detail"), isRelated: globalIsRelated, ctx: ctx, cancel: cancel, timeout: -1}}
}

// GetTableName get sql table name.获取数据库名字
func (obj *_WkbUserDetailMgr) GetTableName() string {
	return "wkb_user_detail"
}

// Get 获取
func (obj *_WkbUserDetailMgr) Get() (result WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Find(&result).Error

	return
}

// Gets 获取批量结果
func (obj *_WkbUserDetailMgr) Gets() (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Find(&results).Error

	return
}

//////////////////////////option case ////////////////////////////////////////////

// WithID id获取 用户详情编号
func (obj *_WkbUserDetailMgr) WithID(id uint32) Option {
	return optionFunc(func(o *options) { o.query["id"] = id })
}

// WithUId uid获取 用户编号
func (obj *_WkbUserDetailMgr) WithUId(uid int) Option {
	return optionFunc(func(o *options) { o.query["uid"] = uid })
}

// WithRealname realname获取 真实姓名
func (obj *_WkbUserDetailMgr) WithRealname(realname string) Option {
	return optionFunc(func(o *options) { o.query["realname"] = realname })
}

// WithRealnameStatus realname_status获取 表示真实姓名是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) WithRealnameStatus(realnameStatus int8) Option {
	return optionFunc(func(o *options) { o.query["realname_status"] = realnameStatus })
}

// WithSex sex获取 0表示女 1表示男
func (obj *_WkbUserDetailMgr) WithSex(sex int8) Option {
	return optionFunc(func(o *options) { o.query["sex"] = sex })
}

// WithMobile mobile获取 手机号码
func (obj *_WkbUserDetailMgr) WithMobile(mobile string) Option {
	return optionFunc(func(o *options) { o.query["mobile"] = mobile })
}

// WithEmail email获取 邮箱
func (obj *_WkbUserDetailMgr) WithEmail(email string) Option {
	return optionFunc(func(o *options) { o.query["email"] = email })
}

// WithCo co获取 公司
func (obj *_WkbUserDetailMgr) WithCo(co string) Option {
	return optionFunc(func(o *options) { o.query["co"] = co })
}

// WithAddress address获取 收货地址
func (obj *_WkbUserDetailMgr) WithAddress(address string) Option {
	return optionFunc(func(o *options) { o.query["address"] = address })
}

// WithWorkYears work_years获取 工作年限
func (obj *_WkbUserDetailMgr) WithWorkYears(workYears int) Option {
	return optionFunc(func(o *options) { o.query["work_years"] = workYears })
}

// WithMobileStatus mobile_status获取 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) WithMobileStatus(mobileStatus int8) Option {
	return optionFunc(func(o *options) { o.query["mobile_status"] = mobileStatus })
}

// WithNickname nickname获取 app端用户昵称
func (obj *_WkbUserDetailMgr) WithNickname(nickname string) Option {
	return optionFunc(func(o *options) { o.query["nickname"] = nickname })
}

// WithWxNickname wx_nickname获取 微信昵称第一时记录的
func (obj *_WkbUserDetailMgr) WithWxNickname(wxNickname string) Option {
	return optionFunc(func(o *options) { o.query["wx_nickname"] = wxNickname })
}

// WithQq qq获取 用户qq
func (obj *_WkbUserDetailMgr) WithQq(qq string) Option {
	return optionFunc(func(o *options) { o.query["qq"] = qq })
}

// WithQqStatus qq_status获取 qq是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) WithQqStatus(qqStatus int8) Option {
	return optionFunc(func(o *options) { o.query["qq_status"] = qqStatus })
}

// WithWechat wechat获取 用户微信号
func (obj *_WkbUserDetailMgr) WithWechat(wechat string) Option {
	return optionFunc(func(o *options) { o.query["wechat"] = wechat })
}

// WithWechatStatus wechat_status获取 qq是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) WithWechatStatus(wechatStatus int8) Option {
	return optionFunc(func(o *options) { o.query["wechat_status"] = wechatStatus })
}

// WithCardNumber card_number获取 身份证号码
func (obj *_WkbUserDetailMgr) WithCardNumber(cardNumber string) Option {
	return optionFunc(func(o *options) { o.query["card_number"] = cardNumber })
}

// WithProvince province获取 用户省份
func (obj *_WkbUserDetailMgr) WithProvince(province int) Option {
	return optionFunc(func(o *options) { o.query["province"] = province })
}

// WithCity city获取 用户城市
func (obj *_WkbUserDetailMgr) WithCity(city int) Option {
	return optionFunc(func(o *options) { o.query["city"] = city })
}

// WithArea area获取 用户地区
func (obj *_WkbUserDetailMgr) WithArea(area int) Option {
	return optionFunc(func(o *options) { o.query["area"] = area })
}

// WithAvatar avatar获取 用户头像
func (obj *_WkbUserDetailMgr) WithAvatar(avatar string) Option {
	return optionFunc(func(o *options) { o.query["avatar"] = avatar })
}

// WithAutograph autograph获取 个人签名-问答头衔
func (obj *_WkbUserDetailMgr) WithAutograph(autograph string) Option {
	return optionFunc(func(o *options) { o.query["autograph"] = autograph })
}

// WithIntroduce introduce获取 个人简介-问答简介
func (obj *_WkbUserDetailMgr) WithIntroduce(introduce string) Option {
	return optionFunc(func(o *options) { o.query["introduce"] = introduce })
}

// WithAnswerCount answer_count获取 用户回答总数
func (obj *_WkbUserDetailMgr) WithAnswerCount(answerCount int) Option {
	return optionFunc(func(o *options) { o.query["answer_count"] = answerCount })
}

// WithFieldID field_id获取 擅长领域之前是id
func (obj *_WkbUserDetailMgr) WithFieldID(fieldID string) Option {
	return optionFunc(func(o *options) { o.query["field_id"] = fieldID })
}

// WithSign sign获取 个人标签
func (obj *_WkbUserDetailMgr) WithSign(sign string) Option {
	return optionFunc(func(o *options) { o.query["sign"] = sign })
}

// WithToMeAskMoney to_me_ask_money获取 向我提提问需要支付金额
func (obj *_WkbUserDetailMgr) WithToMeAskMoney(toMeAskMoney float64) Option {
	return optionFunc(func(o *options) { o.query["to_me_ask_money"] = toMeAskMoney })
}

// WithIsToMeAsk is_to_me_ask获取 是否同意向我追问1是，2否
func (obj *_WkbUserDetailMgr) WithIsToMeAsk(isToMeAsk int8) Option {
	return optionFunc(func(o *options) { o.query["is_to_me_ask"] = isToMeAsk })
}

// WithIsMinuteListen is_minute_listen获取 是否规定分钟内可以免费听回答1是，2否
func (obj *_WkbUserDetailMgr) WithIsMinuteListen(isMinuteListen int8) Option {
	return optionFunc(func(o *options) { o.query["is_minute_listen"] = isMinuteListen })
}

// WithIsOpenListen is_open_listen获取 开发时,回答超过30天可免费收听1是，2否
func (obj *_WkbUserDetailMgr) WithIsOpenListen(isOpenListen int8) Option {
	return optionFunc(func(o *options) { o.query["is_open_listen"] = isOpenListen })
}

// WithIsModerator is_moderator获取 是否版主1是
func (obj *_WkbUserDetailMgr) WithIsModerator(isModerator int) Option {
	return optionFunc(func(o *options) { o.query["is_moderator"] = isModerator })
}

// WithEmployeePraiseRate employee_praise_rate获取 做为服务商的好评数量
func (obj *_WkbUserDetailMgr) WithEmployeePraiseRate(employeePraiseRate int) Option {
	return optionFunc(func(o *options) { o.query["employee_praise_rate"] = employeePraiseRate })
}

// WithEmployerPraiseRate employer_praise_rate获取 做为雇主的好评数量
func (obj *_WkbUserDetailMgr) WithEmployerPraiseRate(employerPraiseRate int) Option {
	return optionFunc(func(o *options) { o.query["employer_praise_rate"] = employerPraiseRate })
}

// WithReceiveTaskNum receive_task_num获取 承接任务数量
func (obj *_WkbUserDetailMgr) WithReceiveTaskNum(receiveTaskNum int) Option {
	return optionFunc(func(o *options) { o.query["receive_task_num"] = receiveTaskNum })
}

// WithPublishTaskNum publish_task_num获取 发布任务数量
func (obj *_WkbUserDetailMgr) WithPublishTaskNum(publishTaskNum int) Option {
	return optionFunc(func(o *options) { o.query["publish_task_num"] = publishTaskNum })
}

// WithShopStatus shop_status获取 店铺状态: -1.管理员禁用店铺 0.未开启店铺 1.开启店铺 2.关闭店铺
func (obj *_WkbUserDetailMgr) WithShopStatus(shopStatus int8) Option {
	return optionFunc(func(o *options) { o.query["shop_status"] = shopStatus })
}

// WithBalance balance获取 用户资产余额
func (obj *_WkbUserDetailMgr) WithBalance(balance float64) Option {
	return optionFunc(func(o *options) { o.query["balance"] = balance })
}

// WithBalanceStatus balance_status获取 资产冻结 0表示未冻结 1表示资金被冻结
func (obj *_WkbUserDetailMgr) WithBalanceStatus(balanceStatus int8) Option {
	return optionFunc(func(o *options) { o.query["balance_status"] = balanceStatus })
}

// WithLastLoginTime last_login_time获取 最后一次登录时间
func (obj *_WkbUserDetailMgr) WithLastLoginTime(lastLoginTime time.Time) Option {
	return optionFunc(func(o *options) { o.query["last_login_time"] = lastLoginTime })
}

// WithBackgroundurl backgroundurl获取 空间个人资料背景图片
func (obj *_WkbUserDetailMgr) WithBackgroundurl(backgroundurl string) Option {
	return optionFunc(func(o *options) { o.query["backgroundurl"] = backgroundurl })
}

// WithAlternateTips alternate_tips获取 支付提示 0：提示 1：不提示
func (obj *_WkbUserDetailMgr) WithAlternateTips(alternateTips int8) Option {
	return optionFunc(func(o *options) { o.query["alternate_tips"] = alternateTips })
}

// WithEmployeeNum employee_num获取 累计雇佣量
func (obj *_WkbUserDetailMgr) WithEmployeeNum(employeeNum int) Option {
	return optionFunc(func(o *options) { o.query["employee_num"] = employeeNum })
}

// WithIntegral integral获取 积分
func (obj *_WkbUserDetailMgr) WithIntegral(integral int) Option {
	return optionFunc(func(o *options) { o.query["integral"] = integral })
}

// WithReviveValue revive_value获取 用户生命值
func (obj *_WkbUserDetailMgr) WithReviveValue(reviveValue int) Option {
	return optionFunc(func(o *options) { o.query["revive_value"] = reviveValue })
}

// WithAllMoney all_money获取 用户总收入
func (obj *_WkbUserDetailMgr) WithAllMoney(allMoney float64) Option {
	return optionFunc(func(o *options) { o.query["all_money"] = allMoney })
}

// WithAskMeMoney ask_me_money获取 对我提问需要支付金额
func (obj *_WkbUserDetailMgr) WithAskMeMoney(askMeMoney float64) Option {
	return optionFunc(func(o *options) { o.query["ask_me_money"] = askMeMoney })
}

// WithCreatedAt created_at获取 创建时间
func (obj *_WkbUserDetailMgr) WithCreatedAt(createdAt time.Time) Option {
	return optionFunc(func(o *options) { o.query["created_at"] = createdAt })
}

// WithUpdatedAt updated_at获取 更新时间
func (obj *_WkbUserDetailMgr) WithUpdatedAt(updatedAt time.Time) Option {
	return optionFunc(func(o *options) { o.query["updated_at"] = updatedAt })
}

// WithRyToken ry_token获取 融云的token
func (obj *_WkbUserDetailMgr) WithRyToken(ryToken string) Option {
	return optionFunc(func(o *options) { o.query["ry_token"] = ryToken })
}

// WithImUserType im_user_type获取 用户类型:1=普通用户,2=客服
func (obj *_WkbUserDetailMgr) WithImUserType(imUserType int8) Option {
	return optionFunc(func(o *options) { o.query["im_user_type"] = imUserType })
}

// GetByOption 功能选项模式获取
func (obj *_WkbUserDetailMgr) GetByOption(opts ...Option) (result WkbUserDetail, err error) {
	options := options{
		query: make(map[string]interface{}, len(opts)),
	}
	for _, o := range opts {
		o.apply(&options)
	}

	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where(options.query).Find(&result).Error

	return
}

// GetByOptions 批量功能选项模式获取
func (obj *_WkbUserDetailMgr) GetByOptions(opts ...Option) (results []*WkbUserDetail, err error) {
	options := options{
		query: make(map[string]interface{}, len(opts)),
	}
	for _, o := range opts {
		o.apply(&options)
	}

	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where(options.query).Find(&results).Error

	return
}

//////////////////////////enume case ////////////////////////////////////////////

// GetFromID 通过id获取内容 用户详情编号
func (obj *_WkbUserDetailMgr) GetFromID(id uint32) (result WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("id = ?", id).Find(&result).Error

	return
}

// GetBatchFromID 批量唯一主键查找 用户详情编号
func (obj *_WkbUserDetailMgr) GetBatchFromID(ids []uint32) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("id IN (?)", ids).Find(&results).Error

	return
}

// GetFromUId 通过uid获取内容 用户编号
func (obj *_WkbUserDetailMgr) GetFromUId(uid int) (result WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("uid = ?", uid).Find(&result).Error

	return
}

// GetBatchFromUId 批量唯一主键查找 用户编号
func (obj *_WkbUserDetailMgr) GetBatchFromUId(uids []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("uid IN (?)", uids).Find(&results).Error

	return
}

// GetFromRealname 通过realname获取内容 真实姓名
func (obj *_WkbUserDetailMgr) GetFromRealname(realname string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("realname = ?", realname).Find(&results).Error

	return
}

// GetBatchFromRealname 批量唯一主键查找 真实姓名
func (obj *_WkbUserDetailMgr) GetBatchFromRealname(realnames []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("realname IN (?)", realnames).Find(&results).Error

	return
}

// GetFromRealnameStatus 通过realname_status获取内容 表示真实姓名是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetFromRealnameStatus(realnameStatus int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("realname_status = ?", realnameStatus).Find(&results).Error

	return
}

// GetBatchFromRealnameStatus 批量唯一主键查找 表示真实姓名是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetBatchFromRealnameStatus(realnameStatuss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("realname_status IN (?)", realnameStatuss).Find(&results).Error

	return
}

// GetFromSex 通过sex获取内容 0表示女 1表示男
func (obj *_WkbUserDetailMgr) GetFromSex(sex int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("sex = ?", sex).Find(&results).Error

	return
}

// GetBatchFromSex 批量唯一主键查找 0表示女 1表示男
func (obj *_WkbUserDetailMgr) GetBatchFromSex(sexs []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("sex IN (?)", sexs).Find(&results).Error

	return
}

// GetFromMobile 通过mobile获取内容 手机号码
func (obj *_WkbUserDetailMgr) GetFromMobile(mobile string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("mobile = ?", mobile).Find(&results).Error

	return
}

// GetBatchFromMobile 批量唯一主键查找 手机号码
func (obj *_WkbUserDetailMgr) GetBatchFromMobile(mobiles []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("mobile IN (?)", mobiles).Find(&results).Error

	return
}

// GetFromEmail 通过email获取内容 邮箱
func (obj *_WkbUserDetailMgr) GetFromEmail(email string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("email = ?", email).Find(&results).Error

	return
}

// GetBatchFromEmail 批量唯一主键查找 邮箱
func (obj *_WkbUserDetailMgr) GetBatchFromEmail(emails []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("email IN (?)", emails).Find(&results).Error

	return
}

// GetFromCo 通过co获取内容 公司
func (obj *_WkbUserDetailMgr) GetFromCo(co string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("co = ?", co).Find(&results).Error

	return
}

// GetBatchFromCo 批量唯一主键查找 公司
func (obj *_WkbUserDetailMgr) GetBatchFromCo(cos []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("co IN (?)", cos).Find(&results).Error

	return
}

// GetFromAddress 通过address获取内容 收货地址
func (obj *_WkbUserDetailMgr) GetFromAddress(address string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("address = ?", address).Find(&results).Error

	return
}

// GetBatchFromAddress 批量唯一主键查找 收货地址
func (obj *_WkbUserDetailMgr) GetBatchFromAddress(addresss []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("address IN (?)", addresss).Find(&results).Error

	return
}

// GetFromWorkYears 通过work_years获取内容 工作年限
func (obj *_WkbUserDetailMgr) GetFromWorkYears(workYears int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("work_years = ?", workYears).Find(&results).Error

	return
}

// GetBatchFromWorkYears 批量唯一主键查找 工作年限
func (obj *_WkbUserDetailMgr) GetBatchFromWorkYears(workYearss []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("work_years IN (?)", workYearss).Find(&results).Error

	return
}

// GetFromMobileStatus 通过mobile_status获取内容 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetFromMobileStatus(mobileStatus int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("mobile_status = ?", mobileStatus).Find(&results).Error

	return
}

// GetBatchFromMobileStatus 批量唯一主键查找 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetBatchFromMobileStatus(mobileStatuss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("mobile_status IN (?)", mobileStatuss).Find(&results).Error

	return
}

// GetFromNickname 通过nickname获取内容 app端用户昵称
func (obj *_WkbUserDetailMgr) GetFromNickname(nickname string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("nickname = ?", nickname).Find(&results).Error

	return
}

// GetBatchFromNickname 批量唯一主键查找 app端用户昵称
func (obj *_WkbUserDetailMgr) GetBatchFromNickname(nicknames []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("nickname IN (?)", nicknames).Find(&results).Error

	return
}

// GetFromWxNickname 通过wx_nickname获取内容 微信昵称第一时记录的
func (obj *_WkbUserDetailMgr) GetFromWxNickname(wxNickname string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("wx_nickname = ?", wxNickname).Find(&results).Error

	return
}

// GetBatchFromWxNickname 批量唯一主键查找 微信昵称第一时记录的
func (obj *_WkbUserDetailMgr) GetBatchFromWxNickname(wxNicknames []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("wx_nickname IN (?)", wxNicknames).Find(&results).Error

	return
}

// GetFromQq 通过qq获取内容 用户qq
func (obj *_WkbUserDetailMgr) GetFromQq(qq string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("qq = ?", qq).Find(&results).Error

	return
}

// GetBatchFromQq 批量唯一主键查找 用户qq
func (obj *_WkbUserDetailMgr) GetBatchFromQq(qqs []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("qq IN (?)", qqs).Find(&results).Error

	return
}

// GetFromQqStatus 通过qq_status获取内容 qq是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetFromQqStatus(qqStatus int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("qq_status = ?", qqStatus).Find(&results).Error

	return
}

// GetBatchFromQqStatus 批量唯一主键查找 qq是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetBatchFromQqStatus(qqStatuss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("qq_status IN (?)", qqStatuss).Find(&results).Error

	return
}

// GetFromWechat 通过wechat获取内容 用户微信号
func (obj *_WkbUserDetailMgr) GetFromWechat(wechat string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("wechat = ?", wechat).Find(&results).Error

	return
}

// GetBatchFromWechat 批量唯一主键查找 用户微信号
func (obj *_WkbUserDetailMgr) GetBatchFromWechat(wechats []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("wechat IN (?)", wechats).Find(&results).Error

	return
}

// GetFromWechatStatus 通过wechat_status获取内容 qq是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetFromWechatStatus(wechatStatus int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("wechat_status = ?", wechatStatus).Find(&results).Error

	return
}

// GetBatchFromWechatStatus 批量唯一主键查找 qq是否公开 0表示不公开 1表示公开
func (obj *_WkbUserDetailMgr) GetBatchFromWechatStatus(wechatStatuss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("wechat_status IN (?)", wechatStatuss).Find(&results).Error

	return
}

// GetFromCardNumber 通过card_number获取内容 身份证号码
func (obj *_WkbUserDetailMgr) GetFromCardNumber(cardNumber string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("card_number = ?", cardNumber).Find(&results).Error

	return
}

// GetBatchFromCardNumber 批量唯一主键查找 身份证号码
func (obj *_WkbUserDetailMgr) GetBatchFromCardNumber(cardNumbers []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("card_number IN (?)", cardNumbers).Find(&results).Error

	return
}

// GetFromProvince 通过province获取内容 用户省份
func (obj *_WkbUserDetailMgr) GetFromProvince(province int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("province = ?", province).Find(&results).Error

	return
}

// GetBatchFromProvince 批量唯一主键查找 用户省份
func (obj *_WkbUserDetailMgr) GetBatchFromProvince(provinces []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("province IN (?)", provinces).Find(&results).Error

	return
}

// GetFromCity 通过city获取内容 用户城市
func (obj *_WkbUserDetailMgr) GetFromCity(city int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("city = ?", city).Find(&results).Error

	return
}

// GetBatchFromCity 批量唯一主键查找 用户城市
func (obj *_WkbUserDetailMgr) GetBatchFromCity(citys []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("city IN (?)", citys).Find(&results).Error

	return
}

// GetFromArea 通过area获取内容 用户地区
func (obj *_WkbUserDetailMgr) GetFromArea(area int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("area = ?", area).Find(&results).Error

	return
}

// GetBatchFromArea 批量唯一主键查找 用户地区
func (obj *_WkbUserDetailMgr) GetBatchFromArea(areas []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("area IN (?)", areas).Find(&results).Error

	return
}

// GetFromAvatar 通过avatar获取内容 用户头像
func (obj *_WkbUserDetailMgr) GetFromAvatar(avatar string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("avatar = ?", avatar).Find(&results).Error

	return
}

// GetBatchFromAvatar 批量唯一主键查找 用户头像
func (obj *_WkbUserDetailMgr) GetBatchFromAvatar(avatars []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("avatar IN (?)", avatars).Find(&results).Error

	return
}

// GetFromAutograph 通过autograph获取内容 个人签名-问答头衔
func (obj *_WkbUserDetailMgr) GetFromAutograph(autograph string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("autograph = ?", autograph).Find(&results).Error

	return
}

// GetBatchFromAutograph 批量唯一主键查找 个人签名-问答头衔
func (obj *_WkbUserDetailMgr) GetBatchFromAutograph(autographs []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("autograph IN (?)", autographs).Find(&results).Error

	return
}

// GetFromIntroduce 通过introduce获取内容 个人简介-问答简介
func (obj *_WkbUserDetailMgr) GetFromIntroduce(introduce string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("introduce = ?", introduce).Find(&results).Error

	return
}

// GetBatchFromIntroduce 批量唯一主键查找 个人简介-问答简介
func (obj *_WkbUserDetailMgr) GetBatchFromIntroduce(introduces []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("introduce IN (?)", introduces).Find(&results).Error

	return
}

// GetFromAnswerCount 通过answer_count获取内容 用户回答总数
func (obj *_WkbUserDetailMgr) GetFromAnswerCount(answerCount int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("answer_count = ?", answerCount).Find(&results).Error

	return
}

// GetBatchFromAnswerCount 批量唯一主键查找 用户回答总数
func (obj *_WkbUserDetailMgr) GetBatchFromAnswerCount(answerCounts []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("answer_count IN (?)", answerCounts).Find(&results).Error

	return
}

// GetFromFieldID 通过field_id获取内容 擅长领域之前是id
func (obj *_WkbUserDetailMgr) GetFromFieldID(fieldID string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("field_id = ?", fieldID).Find(&results).Error

	return
}

// GetBatchFromFieldID 批量唯一主键查找 擅长领域之前是id
func (obj *_WkbUserDetailMgr) GetBatchFromFieldID(fieldIDs []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("field_id IN (?)", fieldIDs).Find(&results).Error

	return
}

// GetFromSign 通过sign获取内容 个人标签
func (obj *_WkbUserDetailMgr) GetFromSign(sign string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("sign = ?", sign).Find(&results).Error

	return
}

// GetBatchFromSign 批量唯一主键查找 个人标签
func (obj *_WkbUserDetailMgr) GetBatchFromSign(signs []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("sign IN (?)", signs).Find(&results).Error

	return
}

// GetFromToMeAskMoney 通过to_me_ask_money获取内容 向我提提问需要支付金额
func (obj *_WkbUserDetailMgr) GetFromToMeAskMoney(toMeAskMoney float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("to_me_ask_money = ?", toMeAskMoney).Find(&results).Error

	return
}

// GetBatchFromToMeAskMoney 批量唯一主键查找 向我提提问需要支付金额
func (obj *_WkbUserDetailMgr) GetBatchFromToMeAskMoney(toMeAskMoneys []float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("to_me_ask_money IN (?)", toMeAskMoneys).Find(&results).Error

	return
}

// GetFromIsToMeAsk 通过is_to_me_ask获取内容 是否同意向我追问1是，2否
func (obj *_WkbUserDetailMgr) GetFromIsToMeAsk(isToMeAsk int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_to_me_ask = ?", isToMeAsk).Find(&results).Error

	return
}

// GetBatchFromIsToMeAsk 批量唯一主键查找 是否同意向我追问1是，2否
func (obj *_WkbUserDetailMgr) GetBatchFromIsToMeAsk(isToMeAsks []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_to_me_ask IN (?)", isToMeAsks).Find(&results).Error

	return
}

// GetFromIsMinuteListen 通过is_minute_listen获取内容 是否规定分钟内可以免费听回答1是，2否
func (obj *_WkbUserDetailMgr) GetFromIsMinuteListen(isMinuteListen int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_minute_listen = ?", isMinuteListen).Find(&results).Error

	return
}

// GetBatchFromIsMinuteListen 批量唯一主键查找 是否规定分钟内可以免费听回答1是，2否
func (obj *_WkbUserDetailMgr) GetBatchFromIsMinuteListen(isMinuteListens []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_minute_listen IN (?)", isMinuteListens).Find(&results).Error

	return
}

// GetFromIsOpenListen 通过is_open_listen获取内容 开发时,回答超过30天可免费收听1是，2否
func (obj *_WkbUserDetailMgr) GetFromIsOpenListen(isOpenListen int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_open_listen = ?", isOpenListen).Find(&results).Error

	return
}

// GetBatchFromIsOpenListen 批量唯一主键查找 开发时,回答超过30天可免费收听1是，2否
func (obj *_WkbUserDetailMgr) GetBatchFromIsOpenListen(isOpenListens []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_open_listen IN (?)", isOpenListens).Find(&results).Error

	return
}

// GetFromIsModerator 通过is_moderator获取内容 是否版主1是
func (obj *_WkbUserDetailMgr) GetFromIsModerator(isModerator int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_moderator = ?", isModerator).Find(&results).Error

	return
}

// GetBatchFromIsModerator 批量唯一主键查找 是否版主1是
func (obj *_WkbUserDetailMgr) GetBatchFromIsModerator(isModerators []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("is_moderator IN (?)", isModerators).Find(&results).Error

	return
}

// GetFromEmployeePraiseRate 通过employee_praise_rate获取内容 做为服务商的好评数量
func (obj *_WkbUserDetailMgr) GetFromEmployeePraiseRate(employeePraiseRate int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("employee_praise_rate = ?", employeePraiseRate).Find(&results).Error

	return
}

// GetBatchFromEmployeePraiseRate 批量唯一主键查找 做为服务商的好评数量
func (obj *_WkbUserDetailMgr) GetBatchFromEmployeePraiseRate(employeePraiseRates []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("employee_praise_rate IN (?)", employeePraiseRates).Find(&results).Error

	return
}

// GetFromEmployerPraiseRate 通过employer_praise_rate获取内容 做为雇主的好评数量
func (obj *_WkbUserDetailMgr) GetFromEmployerPraiseRate(employerPraiseRate int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("employer_praise_rate = ?", employerPraiseRate).Find(&results).Error

	return
}

// GetBatchFromEmployerPraiseRate 批量唯一主键查找 做为雇主的好评数量
func (obj *_WkbUserDetailMgr) GetBatchFromEmployerPraiseRate(employerPraiseRates []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("employer_praise_rate IN (?)", employerPraiseRates).Find(&results).Error

	return
}

// GetFromReceiveTaskNum 通过receive_task_num获取内容 承接任务数量
func (obj *_WkbUserDetailMgr) GetFromReceiveTaskNum(receiveTaskNum int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("receive_task_num = ?", receiveTaskNum).Find(&results).Error

	return
}

// GetBatchFromReceiveTaskNum 批量唯一主键查找 承接任务数量
func (obj *_WkbUserDetailMgr) GetBatchFromReceiveTaskNum(receiveTaskNums []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("receive_task_num IN (?)", receiveTaskNums).Find(&results).Error

	return
}

// GetFromPublishTaskNum 通过publish_task_num获取内容 发布任务数量
func (obj *_WkbUserDetailMgr) GetFromPublishTaskNum(publishTaskNum int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("publish_task_num = ?", publishTaskNum).Find(&results).Error

	return
}

// GetBatchFromPublishTaskNum 批量唯一主键查找 发布任务数量
func (obj *_WkbUserDetailMgr) GetBatchFromPublishTaskNum(publishTaskNums []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("publish_task_num IN (?)", publishTaskNums).Find(&results).Error

	return
}

// GetFromShopStatus 通过shop_status获取内容 店铺状态: -1.管理员禁用店铺 0.未开启店铺 1.开启店铺 2.关闭店铺
func (obj *_WkbUserDetailMgr) GetFromShopStatus(shopStatus int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("shop_status = ?", shopStatus).Find(&results).Error

	return
}

// GetBatchFromShopStatus 批量唯一主键查找 店铺状态: -1.管理员禁用店铺 0.未开启店铺 1.开启店铺 2.关闭店铺
func (obj *_WkbUserDetailMgr) GetBatchFromShopStatus(shopStatuss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("shop_status IN (?)", shopStatuss).Find(&results).Error

	return
}

// GetFromBalance 通过balance获取内容 用户资产余额
func (obj *_WkbUserDetailMgr) GetFromBalance(balance float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("balance = ?", balance).Find(&results).Error

	return
}

// GetBatchFromBalance 批量唯一主键查找 用户资产余额
func (obj *_WkbUserDetailMgr) GetBatchFromBalance(balances []float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("balance IN (?)", balances).Find(&results).Error

	return
}

// GetFromBalanceStatus 通过balance_status获取内容 资产冻结 0表示未冻结 1表示资金被冻结
func (obj *_WkbUserDetailMgr) GetFromBalanceStatus(balanceStatus int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("balance_status = ?", balanceStatus).Find(&results).Error

	return
}

// GetBatchFromBalanceStatus 批量唯一主键查找 资产冻结 0表示未冻结 1表示资金被冻结
func (obj *_WkbUserDetailMgr) GetBatchFromBalanceStatus(balanceStatuss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("balance_status IN (?)", balanceStatuss).Find(&results).Error

	return
}

// GetFromLastLoginTime 通过last_login_time获取内容 最后一次登录时间
func (obj *_WkbUserDetailMgr) GetFromLastLoginTime(lastLoginTime time.Time) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("last_login_time = ?", lastLoginTime).Find(&results).Error

	return
}

// GetBatchFromLastLoginTime 批量唯一主键查找 最后一次登录时间
func (obj *_WkbUserDetailMgr) GetBatchFromLastLoginTime(lastLoginTimes []time.Time) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("last_login_time IN (?)", lastLoginTimes).Find(&results).Error

	return
}

// GetFromBackgroundurl 通过backgroundurl获取内容 空间个人资料背景图片
func (obj *_WkbUserDetailMgr) GetFromBackgroundurl(backgroundurl string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("backgroundurl = ?", backgroundurl).Find(&results).Error

	return
}

// GetBatchFromBackgroundurl 批量唯一主键查找 空间个人资料背景图片
func (obj *_WkbUserDetailMgr) GetBatchFromBackgroundurl(backgroundurls []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("backgroundurl IN (?)", backgroundurls).Find(&results).Error

	return
}

// GetFromAlternateTips 通过alternate_tips获取内容 支付提示 0：提示 1：不提示
func (obj *_WkbUserDetailMgr) GetFromAlternateTips(alternateTips int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("alternate_tips = ?", alternateTips).Find(&results).Error

	return
}

// GetBatchFromAlternateTips 批量唯一主键查找 支付提示 0：提示 1：不提示
func (obj *_WkbUserDetailMgr) GetBatchFromAlternateTips(alternateTipss []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("alternate_tips IN (?)", alternateTipss).Find(&results).Error

	return
}

// GetFromEmployeeNum 通过employee_num获取内容 累计雇佣量
func (obj *_WkbUserDetailMgr) GetFromEmployeeNum(employeeNum int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("employee_num = ?", employeeNum).Find(&results).Error

	return
}

// GetBatchFromEmployeeNum 批量唯一主键查找 累计雇佣量
func (obj *_WkbUserDetailMgr) GetBatchFromEmployeeNum(employeeNums []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("employee_num IN (?)", employeeNums).Find(&results).Error

	return
}

// GetFromIntegral 通过integral获取内容 积分
func (obj *_WkbUserDetailMgr) GetFromIntegral(integral int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("integral = ?", integral).Find(&results).Error

	return
}

// GetBatchFromIntegral 批量唯一主键查找 积分
func (obj *_WkbUserDetailMgr) GetBatchFromIntegral(integrals []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("integral IN (?)", integrals).Find(&results).Error

	return
}

// GetFromReviveValue 通过revive_value获取内容 用户生命值
func (obj *_WkbUserDetailMgr) GetFromReviveValue(reviveValue int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("revive_value = ?", reviveValue).Find(&results).Error

	return
}

// GetBatchFromReviveValue 批量唯一主键查找 用户生命值
func (obj *_WkbUserDetailMgr) GetBatchFromReviveValue(reviveValues []int) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("revive_value IN (?)", reviveValues).Find(&results).Error

	return
}

// GetFromAllMoney 通过all_money获取内容 用户总收入
func (obj *_WkbUserDetailMgr) GetFromAllMoney(allMoney float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("all_money = ?", allMoney).Find(&results).Error

	return
}

// GetBatchFromAllMoney 批量唯一主键查找 用户总收入
func (obj *_WkbUserDetailMgr) GetBatchFromAllMoney(allMoneys []float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("all_money IN (?)", allMoneys).Find(&results).Error

	return
}

// GetFromAskMeMoney 通过ask_me_money获取内容 对我提问需要支付金额
func (obj *_WkbUserDetailMgr) GetFromAskMeMoney(askMeMoney float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("ask_me_money = ?", askMeMoney).Find(&results).Error

	return
}

// GetBatchFromAskMeMoney 批量唯一主键查找 对我提问需要支付金额
func (obj *_WkbUserDetailMgr) GetBatchFromAskMeMoney(askMeMoneys []float64) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("ask_me_money IN (?)", askMeMoneys).Find(&results).Error

	return
}

// GetFromCreatedAt 通过created_at获取内容 创建时间
func (obj *_WkbUserDetailMgr) GetFromCreatedAt(createdAt time.Time) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("created_at = ?", createdAt).Find(&results).Error

	return
}

// GetBatchFromCreatedAt 批量唯一主键查找 创建时间
func (obj *_WkbUserDetailMgr) GetBatchFromCreatedAt(createdAts []time.Time) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("created_at IN (?)", createdAts).Find(&results).Error

	return
}

// GetFromUpdatedAt 通过updated_at获取内容 更新时间
func (obj *_WkbUserDetailMgr) GetFromUpdatedAt(updatedAt time.Time) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("updated_at = ?", updatedAt).Find(&results).Error

	return
}

// GetBatchFromUpdatedAt 批量唯一主键查找 更新时间
func (obj *_WkbUserDetailMgr) GetBatchFromUpdatedAt(updatedAts []time.Time) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("updated_at IN (?)", updatedAts).Find(&results).Error

	return
}

// GetFromRyToken 通过ry_token获取内容 融云的token
func (obj *_WkbUserDetailMgr) GetFromRyToken(ryToken string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("ry_token = ?", ryToken).Find(&results).Error

	return
}

// GetBatchFromRyToken 批量唯一主键查找 融云的token
func (obj *_WkbUserDetailMgr) GetBatchFromRyToken(ryTokens []string) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("ry_token IN (?)", ryTokens).Find(&results).Error

	return
}

// GetFromImUserType 通过im_user_type获取内容 用户类型:1=普通用户,2=客服
func (obj *_WkbUserDetailMgr) GetFromImUserType(imUserType int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("im_user_type = ?", imUserType).Find(&results).Error

	return
}

// GetBatchFromImUserType 批量唯一主键查找 用户类型:1=普通用户,2=客服
func (obj *_WkbUserDetailMgr) GetBatchFromImUserType(imUserTypes []int8) (results []*WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("im_user_type IN (?)", imUserTypes).Find(&results).Error

	return
}

//////////////////////////primary index case ////////////////////////////////////////////

// FetchByPrimaryKey primay or index 获取唯一内容
func (obj *_WkbUserDetailMgr) FetchByPrimaryKey(id uint32) (result WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("id = ?", id).Find(&result).Error

	return
}

// FetchUniqueByUserDetailUIdUnique primay or index 获取唯一内容
func (obj *_WkbUserDetailMgr) FetchUniqueByUserDetailUIdUnique(uid int) (result WkbUserDetail, err error) {
	err = obj.DB.WithContext(obj.ctx).Table(obj.GetTableName()).Where("uid = ?", uid).Find(&result).Error

	return
}
